<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Hard
  </div>
  <div>
   <h1 class="question_title">
    336. Palindrome Pairs
   </h1>
   <p>
    Given a list of
    <b>
     unique
    </b>
    words, find all pairs of
    <b>
     <i>
      distinct
     </i>
    </b>
    indices
    <code>
     (i, j)
    </code>
    in the given list, so that the concatenation of the two words, i.e.
    <code>
     words[i] + words[j]
    </code>
    is a palindrome.
   </p>
   <p>
    <strong>
     Example 1:
    </strong>
   </p>
   <div>
    <pre>
<strong>Input: </strong><span id="example-input-1-1">["abcd","dcba","lls","s","sssll"]</span>
<strong>Output: </strong><span id="example-output-1">[[0,1],[1,0],[3,2],[2,4]] 
<strong>E</strong></span><strong>xplanation<span>: </span></strong>The palindromes are <code>["dcbaabcd","abcddcba","slls","llssssll"]</code>
</pre>
    <div>
     <p>
      <strong>
       Example 2:
      </strong>
     </p>
     <pre>
<strong>Input: </strong><span id="example-input-2-1">["bat","tab","cat"]</span>
<strong>Output: </strong><span id="example-output-2">[[0,1],[1,0]] 
</span><span id="example-output-1"><strong>E</strong></span><strong>xplanation<span>: </span></strong>The palindromes are <code>["battab","tabbat"]</code>
</pre>
    </div>
   </div>
  </div>
  <div>
   <h1 class="question_title">
    336. 回文对
   </h1>
   <p>
    给定一组
    <strong>
     唯一
    </strong>
    的单词， 找出所有
    <strong>
     <em>
      不同&nbsp;
     </em>
    </strong>
    的索引对
    <code>
     (i, j)
    </code>
    ，使得列表中的两个单词，&nbsp;
    <code>
     words[i] + words[j]
    </code>
    &nbsp;，可拼接成回文串。
   </p>
   <p>
    <strong>
     示例 1:
    </strong>
   </p>
   <pre><strong>输入: </strong>["abcd","dcba","lls","s","sssll"]
<strong>输出: </strong>[[0,1],[1,0],[3,2],[2,4]] 
<strong>解释: </strong>可拼接成的回文串为 <code>["dcbaabcd","abcddcba","slls","llssssll"]</code>
</pre>
   <p>
    <strong>
     示例 2:
    </strong>
   </p>
   <pre><strong>输入: </strong>["bat","tab","cat"]
<strong>输出: </strong>[[0,1],[1,0]] 
<strong>解释: </strong>可拼接成的回文串为 <code>["battab","tabbat"]</code></pre>
  </div>
 </body>
</html>